﻿using JinfuyuanProject.Entity;
using JinfuyuanProject.Repository.Interface;
using JinfuyuanProject.Service.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JinfuyuanProject.Service
{
    public class MessageInfoService : IMessageInfoService
    {

        private readonly IMessageInfoRepository _MessageInfoRepository;

        public MessageInfoService(IMessageInfoRepository MessageInfoRepository)
        {
            _MessageInfoRepository = MessageInfoRepository;
        }
        public bool Delete(MessageInfo MessageInfo)
        {
            return _MessageInfoRepository.Delete(MessageInfo);
        }

        public IQueryable<MessageInfo> GetList()
        {
            return _MessageInfoRepository.GetList();
        }

        public MessageInfo GetModel(int Id)
        {
            return _MessageInfoRepository.GetModel(Id);
        }

        public int Insert(MessageInfo MessageInfo)
        {
            return _MessageInfoRepository.Insert(MessageInfo);
        }

        public bool Update(MessageInfo MessageInfo)
        {
            return _MessageInfoRepository.Update(MessageInfo);
        }
    }
}
